package org.csu.zhangdian.controller;

import org.csu.zhangdian.domain.MemberInfo;
import org.csu.zhangdian.service.MemberInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;


import java.util.ArrayList;


@Controller
@RequestMapping("/member")
public class MemberController {

    @Autowired
    private MemberInfoService memberInfoService;

    @GetMapping("/infoList")
    public String getInfo(MemberInfo memberInfo, Model model){

        model.addAttribute("infoList",memberInfoService.getAllMemberInfo());
        return "member/information";
    }

    }
